<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head xmlns:th="http://www.w3.org/1999/xhtml">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>精研 3.0 - 数据表格</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md"><i style="font-family: Microsoft YaHei;color:blueviolet;font-size:12px;" th:text="${qinXuZhiShu.name}"></i>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <a  style="font-family: Microsoft YaHei;color:brown;font-size:13px;"  href="/company/granteTodayStockInfo?flag=asc"  target ="_SELF" >下载今日数据</a>
                            &nbsp;&nbsp;&nbsp;
                            <a  style="font-family: Microsoft YaHei;color:hotpink;font-size:13px;"  href="/company/granteTodayStockInfo?flag=desc"  target ="_SELF" >下载涨幅榜</a>
                        </h5>

                        <h2 class="text-navy">
                            <td th:if="${qinXuZhiShu.zhiShu} ge 0">
                                 <!--此处ne若是换成not equal或者！=,则会js判断错误，无法正常执行-->
                                <i style="color:black;font-size:15px;" >涨跌百分比：</i>
                                <i style="font-family:arial;color:red;font-size:20px;" th:text="${qinXuZhiShu.zhiShu}+'%'" ></i>
                                <i style="font-family:arial;color:black;font-size:20px;" > &nbsp;&nbsp;平均收益：</i>
                                <i style="font-family:arial;color:red;font-size:20px;" th:text="${rate}+'%'" ></i>
                            </td>
                            <td th:if="${qinXuZhiShu.zhiShu} lt 0">
                                <i style="font-family:arial;color:black;font-size:15px;" >涨跌百分比：</i>
                                <!--此处ne若是换成not equal或者！=,则会js判断错误，无法正常执行-->
                                <i style="font-family:arial;font-size:20px;" th:text="${qinXuZhiShu.zhiShu}+'%'" ></i>
                                <i style="font-family:arial;color:black;font-size:20px;" >&nbsp;&nbsp;平均收益：</i>
                                <i style="font-family:arial;color:red;font-size:20px;" th:text="${rate}+'%'" ></i>
                            </td>
                        </h2>
                        <small><p  style="font-family: Microsoft YaHei;color:black;font-size:13px;" th:text="${qinXuZhiShu.date.substring(0,4)+' 年 '+qinXuZhiShu.date.substring(4,6)+' 月 '+qinXuZhiShu.date.substring(6,8)+' 日 '}"></p>
                        </small>
                    </div>
                </div>
            </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
<!--                                    <th>id</th>-->
                                    <th>名称</th>
                                    <th>价格</th>
                                    <th>涨跌幅</th>
                                    <th>日期</th>
                                    <th>取消关注</th>
                                </tr>
                            </thead>
                            <tbody>
                            <tr class="gradeX" th:each="result,resultStat:${resultList}" >
<!--                            <td th:text="${result.code}" th:style="${result.zhangdie > 0 ? 'font-family:arial;color:red;font-size:20px;':'font-family:arial;color:green;font-size:15px;'}"></td>-->
                                <td>
                                     <a th:text="${result.name}" th:href="@{'http://stockpage.10jqka.com.cn/'+${#strings.substring(result.code,2,8)}}" th:style="${result.zhangdie > 0 ? 'font-family:arial;color:red;font-size:20px;':'font-family:arial;color:green;font-size:15px;'}" th:target ="_BLANK"/>
                                </td>
                                <td th:text="${result.price}"   th:style="${result.zhangdie > 0 ? 'font-family:arial;color:red;font-size:20px;':'font-family:arial;color:green;font-size:15px;'}" ></td>
                                <td th:text="${result.zhangdie + '%'}" th:style="${result.zhangdie > 0 ? 'font-family:arial;color:red;font-size:20px;':'font-family:arial;color:green;font-size:15px;'}"></td>
                                <td th:text="${result.date}" style="font-family:arial;color:#6b7d86;font-size:12px;"></td>
                                <td >
                                   <a style="font-family:arial;color:red;font-size:15px;" id="aaaaaa" th:text="关闭" th:href="@{'/company/markType?type=0&flag=update&code='+${result.code}}" th:target ="_SELF"/>
                                </td>
                            </tr>
                        </table>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script src="/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="/js/content.min.js?v=1.0.0"></script>
    <script>
        $(document).ready(function () {
            $(".dataTables-example").dataTable();
            var oTable = $("#editable").dataTable();
            oTable.$("td").editable("../example_ajax.php", {
                "callback": function (sValue, y) {
                    var aPos = oTable.fnGetPosition(this);
                    oTable.fnUpdate(sValue, aPos[0], aPos[1])
                }, "submitdata": function (value, settings) {
                    return {"row_id": this.parentNode.getAttribute("id"), "column": oTable.fnGetPosition(this)[2]}
                }, "width": "90%", "height": "100%"
            })
        });

        function fnClickAddRow() {
            $("#editable").dataTable().fnAddData(["Custom row", "New row", "New row", "New row", "New row"])
        };
        function requestDataHidden(code) {
            document.getElementById("aaaaaa").style.display="none";
        };
        function requestData() {
            var code="sz000027";
            $.get("/company/markType?type=1&flag=update&code="+code,function(data,status){
                document.getElementById(code+"open").style.display="none";
                document.getElementById(code+"close").style.display="block";
            });
        };

        function requestDataClose() {
            var code="sz000027";
            $.get("/company/markType?type=0&flag=update&code="+code,function(data,status){
                document.getElementById(code+"close").style.display="none";
                document.getElementById(code+"open").style.display="block";
            });
        };
    </script>
</body>

</html>